package data;

import java.io.Serializable;

public class Business implements Serializable {
	public String name;
	public String address;
	public String city;
	public String state;
	public String category;
	public double lat;
	public double lon;
	
	
	public Business(String name, String address, String city, String state, String category, double lat, double lon) {
		this.name = name;
		this.address = address;
		this.city = city;
		this.state = state;
		this.category = category;
		this.lat = lat;
		this.lon = lon;
	}	
	
	
	public int hashCode() {
		return (name+address).hashCode();
	}
	public boolean equals(Object o) {
		if(o instanceof Business) {
			Business b = (Business)o;
			return name.equals(b.name) && address.equals(b.address);
		}
		return false;
	}
	
	public int genKey() {
		return (name+address+city+state).hashCode();
	}
	
}
